<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of article
 *
 * @author Administrator
 */
class survey extends CI_Controller {

    public function __construct() {
        parent::__construct();
        //print_r($this->uri->segments);
    }

    public function index() {

        $this->load->library('a_class');
        $class_obj = new a_class();
        $data['child_nav'] = $class_obj->get_child_class_all(CONFIG_ID,7);
        $data['menu_name'] = $class_obj->get_class(7);
        //print_r($this->load->get_var('nav_check'));

        $this->load->library('a_product');
        $product_obj = new a_product();
        $data['product_list'] = $product_obj->get_product_list_page(CONFIG_ID);
        $page = isset($_GET['page'])?$_GET['page']:1;//当前页
        $arr = array (
            'page' => $page,//当前页
            'page_size' => 10,     //分页总大小
            'total' => $data['product_list']['page']['cnt']//总记录数
        );
        $start_page = ($page-1)*10;
        $data['pagination'] = new pagination($arr);
        $this->load->view('survey',$data);
    }

}
